package com.icart.entities;

import javax.persistence.*;

@Entity
@Table(name = "wo_servbookitem", schema = "ams", catalog = "")
@IdClass(WoServbookitemEntityPK.class)
public class WoServbookitemEntity {
    private long bookseq;
    private long servitemid;
    private Integer cnt;
    private long packid;
    private Long busiid;

    @Id
    @Column(name = "bookseq")
    public long getBookseq() {
        return bookseq;
    }

    public void setBookseq(long bookseq) {
        this.bookseq = bookseq;
    }

    @Id
    @Column(name = "servitemid")
    public long getServitemid() {
        return servitemid;
    }

    public void setServitemid(long servitemid) {
        this.servitemid = servitemid;
    }

    @Basic
    @Column(name = "cnt")
    public Integer getCnt() {
        return cnt;
    }

    public void setCnt(Integer cnt) {
        this.cnt = cnt;
    }

    @Basic
    @Column(name = "packid")
    public long getPackid() {
        return packid;
    }

    public void setPackid(long packid) {
        this.packid = packid;
    }

    @Basic
    @Column(name = "busiid")
    public Long getBusiid() {
        return busiid;
    }

    public void setBusiid(Long busiid) {
        this.busiid = busiid;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        WoServbookitemEntity that = (WoServbookitemEntity) o;

        if (bookseq != that.bookseq) return false;
        if (servitemid != that.servitemid) return false;
        if (packid != that.packid) return false;
        if (cnt != null ? !cnt.equals(that.cnt) : that.cnt != null) return false;
        if (busiid != null ? !busiid.equals(that.busiid) : that.busiid != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = (int) (bookseq ^ (bookseq >>> 32));
        result = 31 * result + (int) (servitemid ^ (servitemid >>> 32));
        result = 31 * result + (cnt != null ? cnt.hashCode() : 0);
        result = 31 * result + (int) (packid ^ (packid >>> 32));
        result = 31 * result + (busiid != null ? busiid.hashCode() : 0);
        return result;
    }
}
